
#include <iostream>
#include <string>
#include <tuple>

#include <glm\glm.hpp>
#include <glm\gtc\type_ptr.hpp>

#include "std140.h"

int main()
{
	using MyGlslStruct = layout_std140_struct
	<
		glm::f32,
		glm::vec3,
		glm::mat4,
		std::array<glm::f32, 3>,
		glm::i32,
		glm::i32,
		layout_std140_struct
		<
			glm::f32,
			bool
		>
	>;

	std::cout << MyGlslStruct::size() << "\n";
	std::cout << MyGlslStruct::offset_of<2>() << "\n";
	std::cout << typeid(MyGlslStruct::member_type<1>).name() << "\n";
	std::cout << MyGlslStruct::member_type<6>::offset_of<1>() << "\n";

	char buffer[MyGlslStruct::size()];
	glm::vec3 vec = { 1.f, 1.f, 1.f };

	MyGlslStruct::buffer_type buffer2;


	MyGlslStruct obj;
	std::cout << sizeof(obj) << "\n";

	/*
	glBufferSubData(
		GL_UNIFORM_BUFFER,
		MyGlslStruct::offset_of<1>(),
		MyGlslStruct::member_type_traits<1>::size(),
		glm::value_ptr(vec));
		*/
}